package top.tangyh.basic.spring_mvc.vo.result.system;
import cn.hutool.core.map.MapUtil;
import lombok.*;
import lombok.experimental.Accessors;
import top.tangyh.basic.spring_mvc.base.TreeEntity;
import java.io.Serializable;
import java.util.Map;

/**
 * <p>
 * 实体类
 * 组织
 * </p>
 *
 * @author CJ
 * @since 2021-10-18
 */
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
public class BaseOrgResultVO extends TreeEntity<BaseOrgResultVO, Long> implements Serializable {

    private static final long serialVersionUID = 1L;
    @Builder.Default
    private Map<String, Object> echoMap = MapUtil.newHashMap();

    private Long id;

    /**
     * 名称
     */
    private String name;
    /**
     * 类型;[10-单位 20-部门]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.Base.ORG_TYPE)
     */
    private String type;
    /**
     * 简称
     */
    private String shortName;
    private Long parentId;
    /**
     * 树层级
     */
    private Integer treeGrade;
    /**
     * 树路径;用id拼接树结构
     */
    private String treePath;
    /**
     * 排序
     */
    private Integer sortValue;
    /**
     * 状态;[0-禁用 1-启用]
     */
    private Boolean state;
    /**
     * 备注
     */
    private String remarks;

    public Map<String, Object> getEchoMap() {
        return echoMap;
    }

    public void setEchoMap(Map<String, Object> echoMap) {
        this.echoMap = echoMap;
    }

    @Override
    public Long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    @Override
    public Long getParentId() {
        return parentId;
    }

    public Integer getTreeGrade() {
        return treeGrade;
    }

    public void setTreeGrade(Integer treeGrade) {
        this.treeGrade = treeGrade;
    }

    public String getTreePath() {
        return treePath;
    }

    public void setTreePath(String treePath) {
        this.treePath = treePath;
    }

    @Override
    public Integer getSortValue() {
        return sortValue;
    }

    public Boolean getState() {
        return state;
    }

    public void setState(Boolean state) {
        this.state = state;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
}
